Optimal. Leaf size=215 \[ \frac {x \sqrt {2+x^2}}{3 (a-b) \left (1+x^2\right )^{3/2}}+\frac {\sqrt {2} (a-2 b) \sqrt {2+x^2} E\left (\tan ^{-1}(x)|\frac {1}{2}\right )}{(a-b)^2 \sqrt {1+x^2} \sqrt {\frac {2+x^2}{1+x^2}}}-\frac {\sqrt {2} \sqrt {2+x^2} F\left (\tan ^{-1}(x)|\frac {1}{2}\right )}{3 (a-b) \sqrt {1+x^2} \sqrt {\frac {2+x^2}{1+x^2}}}+\frac {2 b^2 \sqrt {1+x^2} \Pi \left (1-\frac {2 b}{a};\left .\tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )\right |-1\right )}{a (a-b)^2 \sqrt {\frac {1+x^2}{2+x^2}} \sqrt {2+x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 215, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {560, 553, 540,
539, 429, 422} \begin {gather*} \frac {2 b^2 \sqrt {x^2+1} \Pi \left (1-\frac {2 b}{a};\left .\text {ArcTan}\left (\frac {x}{\sqrt {2}}\right )\right |-1\right )}{a \sqrt {\frac {x^2+1}{x^2+2}} \sqrt {x^2+2} (a-b)^2}-\frac {\sqrt {2} \sqrt {x^2+2} F\left (\text {ArcTan}(x)\left |\frac {1}{2}\right .\right )}{3 \sqrt {x^2+1} \sqrt {\frac {x^2+2}{x^2+1}} (a-b)}+\frac {\sqrt {2} \sqrt {x^2+2} (a-2 b) E\left (\text {ArcTan}(x)\left |\frac {1}{2}\right .\right )}{\sqrt {x^2+1} \sqrt {\frac {x^2+2}{x^2+1}} (a-b)^2}+\frac {x \sqrt {x^2+2}}{3 \left (x^2+1\right )^{3/2} (a-b)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 422
Rule 429
Rule 539
Rule 540
Rule 553
Rule 560
Rubi steps
\begin {align*} \int \frac {\sqrt {2+x^2}}{\left (1+x^2\right )^{5/2} \left (a+b x^2\right )} \, dx &=-\frac {\int \frac {\sqrt {2+x^2} \left (-a+2 b+b x^2\right )}{\left (1+x^2\right )^{5/2}} \, dx}{(a-b)^2}+\frac {b^2 \int \frac {\sqrt {2+x^2}}{\sqrt {1+x^2} \left (a+b x^2\right )} \, dx}{(a-b)^2}\\ &=\frac {x \sqrt {2+x^2}}{3 (a-b) \left (1+x^2\right )^{3/2}}+\frac {2 b^2 \sqrt {1+x^2} \Pi \left (1-\frac {2 b}{a};\left .\tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )\right |-1\right )}{a (a-b)^2 \sqrt {\frac {1+x^2}{2+x^2}} \sqrt {2+x^2}}+\frac {\int \frac {2 (2 a-5 b)+(a-4 b) x^2}{\left (1+x^2\right )^{3/2} \sqrt {2+x^2}} \, dx}{3 (a-b)^2}\\ &=\frac {x \sqrt {2+x^2}}{3 (a-b) \left (1+x^2\right )^{3/2}}+\frac {2 b^2 \sqrt {1+x^2} \Pi \left (1-\frac {2 b}{a};\left .\tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )\right |-1\right )}{a (a-b)^2 \sqrt {\frac {1+x^2}{2+x^2}} \sqrt {2+x^2}}+\frac {(a-2 b) \int \frac {\sqrt {2+x^2}}{\left (1+x^2\right )^{3/2}} \, dx}{(a-b)^2}-\frac {2 \int \frac {1}{\sqrt {1+x^2} \sqrt {2+x^2}} \, dx}{3 (a-b)}\\ &=\frac {x \sqrt {2+x^2}}{3 (a-b) \left (1+x^2\right )^{3/2}}+\frac {\sqrt {2} (a-2 b) \sqrt {2+x^2} E\left (\tan ^{-1}(x)|\frac {1}{2}\right )}{(a-b)^2 \sqrt {1+x^2} \sqrt {\frac {2+x^2}{1+x^2}}}-\frac {\sqrt {2} \sqrt {2+x^2} F\left (\tan ^{-1}(x)|\frac {1}{2}\right )}{3 (a-b) \sqrt {1+x^2} \sqrt {\frac {2+x^2}{1+x^2}}}+\frac {2 b^2 \sqrt {1+x^2} \Pi \left (1-\frac {2 b}{a};\left .\tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )\right |-1\right )}{a (a-b)^2 \sqrt {\frac {1+x^2}{2+x^2}} \sqrt {2+x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 3.08, size = 357, normalized size = 1.66 \begin {gather*} \frac {8 a^2 x \sqrt {1+x^2} \sqrt {2+x^2}-14 a b x \sqrt {1+x^2} \sqrt {2+x^2}+6 a^2 x^3 \sqrt {1+x^2} \sqrt {2+x^2}-12 a b x^3 \sqrt {1+x^2} \sqrt {2+x^2}+6 i \sqrt {2} a (a-2 b) \left (1+x^2\right )^2 E\left (i \sinh ^{-1}(x)|\frac {1}{2}\right )-i \sqrt {2} a (4 a-7 b) \left (1+x^2\right )^2 F\left (i \sinh ^{-1}(x)|\frac {1}{2}\right )+3 i \sqrt {2} a b \Pi \left (\frac {b}{a};i \sinh ^{-1}(x)|\frac {1}{2}\right )-6 i \sqrt {2} b^2 \Pi \left (\frac {b}{a};i \sinh ^{-1}(x)|\frac {1}{2}\right )+6 i \sqrt {2} a b x^2 \Pi \left (\frac {b}{a};i \sinh ^{-1}(x)|\frac {1}{2}\right )-12 i \sqrt {2} b^2 x^2 \Pi \left (\frac {b}{a};i \sinh ^{-1}(x)|\frac {1}{2}\right )+3 i \sqrt {2} a b x^4 \Pi \left (\frac {b}{a};i \sinh ^{-1}(x)|\frac {1}{2}\right )-6 i \sqrt {2} b^2 x^4 \Pi \left (\frac {b}{a};i \sinh ^{-1}(x)|\frac {1}{2}\right )}{6 a (a-b)^2 \left (1+x^2\right )^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 476 vs. \(2 (234 ) = 468\).
time = 0.16, size = 477, normalized size = 2.22
method | result | size |
elliptic | \(\frac {\sqrt {\left (x^{2}+1\right ) \left (x^{2}+2\right )}\, \left (\frac {x \sqrt {x^{4}+3 x^{2}+2}}{3 \left (a -b \right ) \left (x^{2}+1\right )^{2}}+\frac {\left (x^{2}+2\right ) x \left (a -2 b \right )}{\left (a -b \right )^{2} \sqrt {\left (x^{2}+1\right ) \left (x^{2}+2\right )}}-\frac {i \sqrt {2}\, \sqrt {2 x^{2}+4}\, \sqrt {x^{2}+1}\, \EllipticF \left (\frac {i x \sqrt {2}}{2}, \sqrt {2}\right )}{6 \sqrt {x^{4}+3 x^{2}+2}\, \left (a -b \right )}+\frac {i \sqrt {2}\, \sqrt {2 x^{2}+4}\, \sqrt {x^{2}+1}\, a \EllipticE \left (\frac {i x \sqrt {2}}{2}, \sqrt {2}\right )}{2 \left (a -b \right )^{2} \sqrt {x^{4}+3 x^{2}+2}}-\frac {i \sqrt {2}\, \sqrt {2 x^{2}+4}\, \sqrt {x^{2}+1}\, b \EllipticE \left (\frac {i x \sqrt {2}}{2}, \sqrt {2}\right )}{\left (a -b \right )^{2} \sqrt {x^{4}+3 x^{2}+2}}+\frac {i b \sqrt {2}\, \sqrt {1+\frac {x^{2}}{2}}\, \sqrt {x^{2}+1}\, \EllipticPi \left (\frac {i x \sqrt {2}}{2}, \frac {2 b}{a}, \sqrt {2}\right )}{\left (a -b \right )^{2} \sqrt {x^{4}+3 x^{2}+2}}-\frac {2 i b^{2} \sqrt {2}\, \sqrt {1+\frac {x^{2}}{2}}\, \sqrt {x^{2}+1}\, \EllipticPi \left (\frac {i x \sqrt {2}}{2}, \frac {2 b}{a}, \sqrt {2}\right )}{\left (a -b \right )^{2} a \sqrt {x^{4}+3 x^{2}+2}}\right )}{\sqrt {x^{2}+1}\, \sqrt {x^{2}+2}}\) | \(372\) |
default | \(\frac {-6 i \EllipticE \left (\frac {i x \sqrt {2}}{2}, \sqrt {2}\right ) a b \sqrt {x^{2}+2}\, \sqrt {x^{2}+1}-6 i \EllipticE \left (\frac {i x \sqrt {2}}{2}, \sqrt {2}\right ) a b \,x^{2} \sqrt {x^{2}+2}\, \sqrt {x^{2}+1}+i \EllipticF \left (\frac {i x \sqrt {2}}{2}, \sqrt {2}\right ) a b \,x^{2} \sqrt {x^{2}+2}\, \sqrt {x^{2}+1}+3 i \EllipticE \left (\frac {i x \sqrt {2}}{2}, \sqrt {2}\right ) a^{2} \sqrt {x^{2}+2}\, \sqrt {x^{2}+1}+3 i \EllipticPi \left (\frac {i x \sqrt {2}}{2}, \frac {2 b}{a}, \sqrt {2}\right ) a b \,x^{2} \sqrt {x^{2}+2}\, \sqrt {x^{2}+1}-i \EllipticF \left (\frac {i x \sqrt {2}}{2}, \sqrt {2}\right ) a^{2} \sqrt {x^{2}+2}\, \sqrt {x^{2}+1}+3 a^{2} x^{5}-6 a b \,x^{5}+3 i \EllipticPi \left (\frac {i x \sqrt {2}}{2}, \frac {2 b}{a}, \sqrt {2}\right ) a b \sqrt {x^{2}+2}\, \sqrt {x^{2}+1}-6 i \EllipticPi \left (\frac {i x \sqrt {2}}{2}, \frac {2 b}{a}, \sqrt {2}\right ) b^{2} \sqrt {x^{2}+2}\, \sqrt {x^{2}+1}-6 i \EllipticPi \left (\frac {i x \sqrt {2}}{2}, \frac {2 b}{a}, \sqrt {2}\right ) b^{2} x^{2} \sqrt {x^{2}+2}\, \sqrt {x^{2}+1}-i \EllipticF \left (\frac {i x \sqrt {2}}{2}, \sqrt {2}\right ) a^{2} x^{2} \sqrt {x^{2}+2}\, \sqrt {x^{2}+1}+3 i \EllipticE \left (\frac {i x \sqrt {2}}{2}, \sqrt {2}\right ) a^{2} x^{2} \sqrt {x^{2}+2}\, \sqrt {x^{2}+1}+i \EllipticF \left (\frac {i x \sqrt {2}}{2}, \sqrt {2}\right ) a b \sqrt {x^{2}+2}\, \sqrt {x^{2}+1}+10 a^{2} x^{3}-19 a b \,x^{3}+8 a^{2} x -14 a b x}{3 \sqrt {x^{2}+2}\, \left (a -b \right )^{2} a \left (x^{2}+1\right )^{\frac {3}{2}}}\) | \(477\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\sqrt {x^2+2}}{{\left (x^2+1\right )}^{5/2}\,\left (b\,x^2+a\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________